UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ITVPyUrlOwhFmUYLmgFrr0gpsRqeKbfx/lFbc3MUOdA='
WHERE
key_id = 'eeaff0c03f32e481169ea59530625f1dc06524bca5c69ab033ad5d9b5b35bd64'
AND (
token = 'ITVPyUrlOwhFmUYLmgFrr0gpsRqeKbfx/lFbc3MUOdA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)