UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5FIruYrhTMd2SFrORki94SqJ4SEz+oGc0/Fru9zF7f8=' 
WHERE 
  key_id = '5db37ffb98fe87628a2a120fc21f2564bb6816b9b38e144fa19246ef13ac01d6' 
  AND (
    token = '5FIruYrhTMd2SFrORki94SqJ4SEz+oGc0/Fru9zF7f8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026