UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DCjy8Dzi0ilcsh/tR82PQaH+j49Jpm0VgoYCqqgKmMI=' 
WHERE 
  key_id = 'ca299b682c7a1ee7cf3ef14140dc0e5b84d99b5ebc78419177fa7f82fa6530e2' 
  AND (
    token = 'DCjy8Dzi0ilcsh/tR82PQaH+j49Jpm0VgoYCqqgKmMI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017