UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EgXEreRjt76SByLEnrR5EvaQNTVZ+UZY1nG96M6yWi4='
WHERE
key_id = '2443343eab531d3855bc2b5a171241fbcca6e0da7ab5ca4f5551a6f9b1c6f63f'
AND (
token = 'EgXEreRjt76SByLEnrR5EvaQNTVZ+UZY1nG96M6yWi4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)