UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fxU9dR1AKm2sxcMhdOGWJdIJ2j1Z7/aVjPdJxeXnl2c='
WHERE
key_id = '78900939df3679d2a28aefcd0ac352222861441bc83eb00a891928a0bea9c337'
AND (
token = 'fxU9dR1AKm2sxcMhdOGWJdIJ2j1Z7/aVjPdJxeXnl2c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)