UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/c6oEuOveiXdmPlPGWxb9TqibTcO82TfwABE0vgRi1k='
WHERE
key_id = 'a26672cfa5efeda5b0beb1dcf0a0661a2b1797cec069c6fea5b7d7ea4dd91838'
AND (
token = '/c6oEuOveiXdmPlPGWxb9TqibTcO82TfwABE0vgRi1k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)