UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Fwlqi/AkKnGfWKJwhGjEP265zgZ+H1M7mK+cQPtDXuQ='
WHERE
key_id = '2a1cdfa28abf2d86a03e3ea5d34762cdf097de9f09a2ff08a797e3ccfad32c14'
AND (
token = 'Fwlqi/AkKnGfWKJwhGjEP265zgZ+H1M7mK+cQPtDXuQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)