UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+0tRWOOjGxBaxgTZvBKLbyhztw8U5SlXoBX+kCGzbTM=' 
WHERE 
  key_id = '75968dd6cb55eff1f72269bcb4d753ec61a5c6bd10f01b26178aa73e1bb06e9e' 
  AND (
    token = '+0tRWOOjGxBaxgTZvBKLbyhztw8U5SlXoBX+kCGzbTM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021