UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MKs960T5ZgXYqq4DfSBDYwAvKu/sMc2c1Wu7Vruzmuo='
WHERE
key_id = '8408fca79315bcdf3ef5948ba67f2442619d975dee4264eb298a50bee6a74cd9'
AND (
token = 'MKs960T5ZgXYqq4DfSBDYwAvKu/sMc2c1Wu7Vruzmuo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)