UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mbS+Eh58RdEYBCq/FKPjMwjON1DJ4nyDhguvGBUlnM8='
WHERE
key_id = '5232d5f7a883774fda0960e0b2d95caa9f4366bebfc2a8620063175019e44954'
AND (
token = 'mbS+Eh58RdEYBCq/FKPjMwjON1DJ4nyDhguvGBUlnM8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)