UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AQKGxkS4cJVoWZZPjw/DQF38t/vpz1iQQvuBPxXF6bg='
WHERE
key_id = '5647964df533afc38e40abefb555755ac41a69b0cb9820941cc1f2eb0062335a'
AND (
token = 'AQKGxkS4cJVoWZZPjw/DQF38t/vpz1iQQvuBPxXF6bg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)