UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1kvyepwezydEmpr3JJi4CdeiPGu9RdMUKtkhuGGeh9E=' 
WHERE 
  key_id = '550f53413f2d56979bbddb513f7b5e9bc03cc6e2bc59b191effaa308d0ba6d23' 
  AND (
    token = '1kvyepwezydEmpr3JJi4CdeiPGu9RdMUKtkhuGGeh9E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031