UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qk/41eHp2vcP9Qz1UQEnG9X+IKqMGStn7YKshC9thuc=' 
WHERE 
  key_id = '4925f34dc144f43016bf6868bf19c863000f0cbebd66176e864da1949a333ff6' 
  AND (
    token = 'qk/41eHp2vcP9Qz1UQEnG9X+IKqMGStn7YKshC9thuc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00053