UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm/+EwzeV/3xFhw+69P+rLJdtB7DvMy1js1AjPkIY8k8='
WHERE
key_id = 'f076ee0b4c4cb46272a51cac84e214e87018e37e985266b79481fe546e939a6e'
AND (
token = 'm/+EwzeV/3xFhw+69P+rLJdtB7DvMy1js1AjPkIY8k8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)