UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vbxNG6th10HOL/OMvaroPXBc8LeQAVP85CQH+qNGffA='
WHERE
key_id = '37d04851ac9f12081be8273836fa04a0877fba845c24977ba92277b6e0ab3db3'
AND (
token = 'vbxNG6th10HOL/OMvaroPXBc8LeQAVP85CQH+qNGffA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)