UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iokRybOCcVjBRblDQweTUrtGDZp4pLf66eHLxH5Y1vU='
WHERE
key_id = '30b99a3d92d1582260a276964b6d4587b90bfaaa71ec0fc9410e3fe215cfbc71'
AND (
token = 'iokRybOCcVjBRblDQweTUrtGDZp4pLf66eHLxH5Y1vU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)