UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LQ5ZirkGNHUsuhPxl/ME6TgCpoea61cJrezoPIUIDLQ='
WHERE
key_id = '99c08c12bd9d6dbcff576dbc912e6a8ce1ccfde04f92f1a116f4bfe456266408'
AND (
token = 'LQ5ZirkGNHUsuhPxl/ME6TgCpoea61cJrezoPIUIDLQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)