UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3HLOsuauyVlxupbmT6tGrJRW3kGzJlrvrF8gimnInSY='
WHERE
key_id = '2f0ac7b7d6f06d4321a593ecd459b55c41d885d2b9c23b26d690dcf66bbf25b7'
AND (
token = '3HLOsuauyVlxupbmT6tGrJRW3kGzJlrvrF8gimnInSY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)