UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+XmweM2DLC7ObyvMcSjcCjukt2Q9R8G7LFJmfvzPZy0='
WHERE
key_id = '0a2dc5222209803cdcbb972a2b1f486ea3dc1af203f6f5093f4c4fead6838b6d'
AND (
token = '+XmweM2DLC7ObyvMcSjcCjukt2Q9R8G7LFJmfvzPZy0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)