UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/c7tv4vHRxiO+yrQjQem7VmguPVf36IrlDwR2gh/O/U='
WHERE
key_id = '905822bc7e7b0c3eac55ae0cf380fbdb4dafcfe448dd798a9de2db53a14d36b1'
AND (
token = '/c7tv4vHRxiO+yrQjQem7VmguPVf36IrlDwR2gh/O/U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)