UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pFT6K+feAvQYu9TbdFD8XbweYr/FwPvG+GBaLWz8PBQ='
WHERE
key_id = 'a69dc0873ded28867b542ca0cbbc8467c50437bbce8cbb87f0c4f9e361274bf7'
AND (
token = 'pFT6K+feAvQYu9TbdFD8XbweYr/FwPvG+GBaLWz8PBQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)