UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NWb2MF/IbNGKfBCAbRNmZDi+i1V1nqRycpzc8nZy//8='
WHERE
key_id = 'ee49223b6d8d98dff6dc1fbf5662fa92203421d0958a19708929d4db34c4aae5'
AND (
token = 'NWb2MF/IbNGKfBCAbRNmZDi+i1V1nqRycpzc8nZy//8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)