UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0hXOjdXvVZJUoqXVi+rClJh5Fa24Qid7r3N9lm0iGPM=' 
WHERE 
  key_id = 'ea3a8dce843a40564fd90178797fe560ad609422f130e4fbe0f2ca837f0b8d00' 
  AND (
    token = '0hXOjdXvVZJUoqXVi+rClJh5Fa24Qid7r3N9lm0iGPM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031