UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L23GTTJOqRih7FBOSECcaK7rpst+SgPuZf5o2Q65Lrw='
WHERE
key_id = '919fa54f7198d061d0ef44cdd7ae0b4f3945fe00b67b0e156e36c3fe6a8506fc'
AND (
token = 'L23GTTJOqRih7FBOSECcaK7rpst+SgPuZf5o2Q65Lrw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)