UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Xb0PnouTQAJVaTcCgAVcvF6GFMW4wi9boVp1gkQfBwo='
WHERE
key_id = '103a497812dce693903913011bb7c7add0dac970044b597f9c880a571f845768'
AND (
token = 'Xb0PnouTQAJVaTcCgAVcvF6GFMW4wi9boVp1gkQfBwo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)