UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EedoZTXrqENClN0u1e+DX3iNTVldMKyGA/dVddk/zlc='
WHERE
key_id = '3638f09c159f4dbf98d6e4dd547afbc58372b4a9f055bb121cacb2f376da1ba0'
AND (
token = 'EedoZTXrqENClN0u1e+DX3iNTVldMKyGA/dVddk/zlc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)