UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+u6EQp/jxY2e4QCxWoEfEp5fNtpuFkSQ04HYL7aIY2o='
WHERE
key_id = '1db53a0888f6c167bbd8dbf9c7bc4ad49ad4d2fec6172edf84d7c6f636763187'
AND (
token = '+u6EQp/jxY2e4QCxWoEfEp5fNtpuFkSQ04HYL7aIY2o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)