UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LqVFKPzKyZPUesBOWCRp/ap3pCzFmyWTB/nkMaf97bY='
WHERE
key_id = 'e0204eabe6d7f21649a3762ef36929da995ef2678e57094cabb639608bfe776e'
AND (
token = 'LqVFKPzKyZPUesBOWCRp/ap3pCzFmyWTB/nkMaf97bY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)