UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8UFkusZkWyBpX+lA6bIzkHMgqvCvBv/BuWu5dKG0ArA='
WHERE
key_id = '0a268ac47df05102a3a1560a9b4d6340f8341950c8cf8bac12a89207bdc1b88e'
AND (
token = '8UFkusZkWyBpX+lA6bIzkHMgqvCvBv/BuWu5dKG0ArA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)