UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8zkqwGWckvBm11SJmyuRwPNVeZeEIUiyysw8LyoleAM='
WHERE
key_id = 'eb540282dabbe99da963cc97b626db54e12a7b51f01bc86286dd43d87c282971'
AND (
token = '8zkqwGWckvBm11SJmyuRwPNVeZeEIUiyysw8LyoleAM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)