UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mvnAP2jIb5Noy6HEizWbPqCEEXiZ2J9pFv+rkjevi44='
WHERE
key_id = '922f08b1a9a9496892ecdb62373b9e705dad01ea654be8d8cf383a9ed33ea3f6'
AND (
token = 'mvnAP2jIb5Noy6HEizWbPqCEEXiZ2J9pFv+rkjevi44='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)