UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EuQTb/Lc3ixpOgqceqSyP2gk+d4WcjzbCswzIQ4QWm0=' 
WHERE 
  key_id = '9352abf1ad2240be455ef8da992a70c2dca7d65cb67126b6bc5547f1ee8c6ff3' 
  AND (
    token = 'EuQTb/Lc3ixpOgqceqSyP2gk+d4WcjzbCswzIQ4QWm0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019