UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3Wir7Zx4o+n3U92UiyYRXpLLp+wBVyDba9S3Qdbp/3Y='
WHERE
key_id = 'eb62e5d3b1223d03e9eeb38fe42f092cef63cf2a4692ee3338b93d0b33cf452f'
AND (
token = '3Wir7Zx4o+n3U92UiyYRXpLLp+wBVyDba9S3Qdbp/3Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)