UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HjE7WAH7VgRTZDSnF4UQ30dKrl3lRZ3JdvO0ytQ3Yaw='
WHERE
key_id = '94a53b6de5745e6b774db9e983bdf33bbbe30d8fe595506bff341aed1f6c2e44'
AND (
token = 'HjE7WAH7VgRTZDSnF4UQ30dKrl3lRZ3JdvO0ytQ3Yaw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)