UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+T6R4z1jkQxKsZD/MNpY1ITFICmr5cYrGC/lz53wnjs=' 
WHERE 
  key_id = 'fc70d50a8c2ae745ffe6efd102aaa138300cf92ef0f9842bb5d16848d63d1189' 
  AND (
    token = '+T6R4z1jkQxKsZD/MNpY1ITFICmr5cYrGC/lz53wnjs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027