UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/eqrD/bmSWTrnUydgXrPddLhi8YOGoIHYsPl+Le1GjI=' 
WHERE 
  key_id = '11d46aa888f8dd48455013840e72c53b0e0878c398f4aa5c3ceca0c46f9c5514' 
  AND (
    token = '/eqrD/bmSWTrnUydgXrPddLhi8YOGoIHYsPl+Le1GjI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033