UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VTusHGeUqM/1ZpblXwi4sBvmTec3sB7ohrnD/6Pq2Z4='
WHERE
key_id = '917ba8d2b626878164bbd6132586684a81a66b57dde283b03b93e12a63c99e7c'
AND (
token = 'VTusHGeUqM/1ZpblXwi4sBvmTec3sB7ohrnD/6Pq2Z4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)